import sys
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow

if __name__ == '__main__':
    app = QApplication(sys.argv)

    w = QMainWindow()
    w.resize(250, 150)
    w.move(300, 300)
    w.setWindowTitle('This is a MainWindow')
    w.show()

    t = QWidget()
    t.resize(300, 200)
    t.move(100, 150)
    t.setWindowTitle('This is a Widget')
    t.show()

    sys.exit(app.exec_())
